// 导入组件
import Vue from 'vue';
// 管理员列表
import adminList from '@/views/system/adminlist'
// 文章管理
import articleList from '@/views/system/articlelist'
// 场地管理
import fieldList from '@/views/game/fieldlist'
// 比赛管理
import gameList from '@/views/game/gamelist'
// 项目管理
import item from '@/views/game/item'
// 仪表盘
import test from '@/views/game/test'
// 用户管理
import userList from '@/views/user/userlist'
// 报名管理
import registerList from '@/views/game/registerlist'

import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';



/**
 * 基础菜单
 */
// 商品管理
// 机器信息管理


// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
  routes: [{
    path: '/',
    name: '',
    component: login,
    hidden: true,
    meta: {
      requireAuth: false
    }
  }, {
    path: '/login',
    name: '登录',
    component: login,
    hidden: true,
    meta: {
      requireAuth: false
    }
  }, {
    path: '/index',
    name: '首页',
    component: index,
    iconCls: 'el-icon-tickets',
    children: [{
      path: '/system/adminlist',
      name: '管理员设置',
      component: adminList,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/system/articlelist',
      name: '文章管理',
      component: articleList,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/game/fieldlist',
      name: '场地管理',
      component: fieldList,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/game/gamelist',
      name: '比赛管理',
      component: gameList,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/game/item',
      name: '项目管理',
      component: item,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/game/test',
      name: '仪表盘',
      component: test,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/user/userlist',
      name: '用户管理',
      component: userList,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/game/registerlist',
      name: '报名管理',
      component: registerList,
      meta: {
        requireAuth: true
      }
    }
    ]
  }]
})
